package com.heima.admin.controller.v1;

import com.heima.admin.service.AdUserService;
import com.heima.model.admin.dtos.AdUserDTO;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者 itcast
 * @创建日期 2021/11/18 10:30
 **/
@RestController
public class AdLoginController {

    @Autowired
    AdUserService adUserService;

    /**
     * 测试
     * @param dto
     * @return
     */
    @PostMapping("/login/in")
    public ResponseResult login(@RequestBody AdUserDTO dto){
        return adUserService.login(dto);
    }
}
